<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>个人主页</title>
    <link rel="stylesheet" th:href="@{/layui/css/font.css}">
    <link rel="stylesheet" th:href="@{/layui/css/xadmin.css}">
    <link rel="stylesheet" th:href="@{/layui/css/login.css}">
    <script charset="utf-8" th:src="@{/layui/lib/layui/layui.js}"></script>
    <script th:src="@{/layui/js/xadmin.js}" type="text/javascript"></script>
    <style>
        * {
            padding: 0;
            margin: 0;
        }

        body {
            background: rgb(235, 235, 235);
        }

        a {
            text-decoration: none;
            color: white;
        }

        li {
            list-style: none;
            font-size: 20px;
        }

        #header {
            height: 80px;
            width: 100%;
            position: fixed;
            border-radius: 20px;
            background: rgb(230, 200, 200);
            z-index: 100;
        }

        #name {
            position: absolute;
            bottom: 0;
            height: 30px;
            left: 150px;
            color: white;
            font-family: 楷体, serif;
        }

        #name > ul {
            display: none;
            position: absolute;
            width: 100%;
            top: 30px;
        }

        #name > ul li {
            background: rgb(230, 200, 200);
            line-height: 30px;
            width: 100%;
            text-align: CENTER;
            font-size: 18px;
            padding: 10px;
            border-radius: 5px;
        }

        #name > ul li:hover {
            background: rgb(230, 190, 190);
        }

        #down_up {
            position: relative;
            top: 2px;
            left: 2px;
        }

        #name:hover > ul {
            display: block;
        }


        #logo {
            margin-left: 35%;
            line-height: 80px;
            font-family: 楷体, serif;
            font-size: 40px;
        }

        #nav {
            float: right;
            margin-right: 20%;
        }

        #nav li {
            width: auto;
            float: left;
            margin-left: 30px;
            line-height: 80px;
        }

        #nav li > a {
            padding: 5px 10px;
        }

        #nav li :hover {
            background: gray;
            border-radius: 10px;
            color: white;
        }

        #info:before {
            content: "";
            display: block;
            clear: both;
            height: 150px;
        }

        .login {
            margin: auto;
        }

        .login input[type=text], .login input[type=file], .login input[type=password], .login input[type=email], select {
            display: inline-block;
            border: none;
        }

        #resume {
            margin: 60px auto;
        }

        .left {
            float: left;
        }

        .titles {
            font-size: 20px;
        }
    </style>
</head>
<body>
<div id="header">
    <div id="name">
        <label for="idNum"></label><input id="idNum" style="display: none" th:value="${session.student.id}"/>
        欢迎回来:<a href="javascript:" th:text="${session.student.studentName}"></a><i class="iconfont" id="down_up">&#xe6a6;</i>
        <ul>
            <li><a href="javascript:"
                   onclick="xadmin.open('个人消息','/student_message_view?id='+idNum,'600','700',false)">个人消息</a></li>
            <li><a href="javascript:"
                   onclick="xadmin.open('收藏信息','/student_collect_pt_message_view?id='+idNum,'600','700',false)">收藏信息</a>
            </li>
        </ul>
    </div>
    <a href="/index" id="logo">领贤兼职</a>
    <div id="nav">
        <ul>
            <li><a href="/index">首页</a></li>
            <li><a href="/range">领贤兼职</a></li>
            <li><a href="/company_login">企业服务</a></li>
            <li><a href="/student_log_out">退出登录</a></li>
            <li><a href="/university_login">学校服务</a></li>
        </ul>
    </div>
</div>
<div id="info">
    <div class="login layui-anim layui-anim-up" style="max-width: 75%;height: 600px;">
        <div class="message"></div>
        <hr class="hr20">
        <div style="margin: 60px 0 0 50px; width: 200px; height: 200px;float: left">
            <img alt="" src="" style="height: 100%;width: 100%" th:src="${session.student.portrait}">
        </div>
        <form style="float: left; width: 70%;margin-left: 60px">
            <hr class="hr20">
            <div style="float: left">
                <label for="studentName">姓&emsp;&emsp;名&emsp;</label>
                <input class="layui-input" id="studentName" name="studentName" style="width: 240px"
                       th:value="${session.student.studentName}"
                       type="text">
                <hr class="hr15">
                <label for="gender">性&emsp;&emsp;别&emsp;</label>
                <input class="layui-input" id="gender" name="gender" style="width: 240px"
                       th:value="${session.student.gender}" type="text">
                <hr class="hr15">
                <label for="politicsType">政治面貌&emsp;</label>
                <input class="layui-input" id="politicsType" name="politicsType" style="width: 240px"
                       th:value="${session.student.politics.politicsType}"
                       type="text">
                <hr class="hr15">
                <label for="bornDate">出生日期&emsp;</label>
                <input class="layui-input" id="bornDate" name="bornDate" style="width: 240px"
                       th:value="${#dates.format(session.student.bornDate,'yyyy-MM-dd HH:mm:ss')}" type="text">
                <hr class="hr15">
                <label for="email">邮&emsp;&emsp;箱&emsp;</label>
                <input class="layui-input" id="email" name="email" style="width: 240px"
                       th:value="${session.student.email}" type="text">
                <hr class="hr15">
                <label for="phone">联系方式&emsp;</label>
                <input class="layui-input" id="phone" name="phone" style="width: 240px"
                       th:value="${session.student.phone}" type="text">
            </div>

            <div style="float: left;margin-left: 60px">
                <label for="universityName">就读学校&emsp;</label>
                <input class="layui-input" id="universityName" name="universityName" style="width: 240px"
                       th:value="${session.student.university.universityName}"
                       type="text">
                <hr class="hr15">
                <label for="majorName">就读专业&emsp;</label>
                <input class="layui-input" id="majorName" name="majorName" style="width: 240px"
                       th:value="${session.student.major.majorName}"
                       type="text">
                <hr class="hr15">
                <label for="graduateDate">毕业日期&emsp;</label>
                <input class="layui-input" id="graduateDate" name="graduateDate" style="width: 240px"
                       th:value="${#dates.format(session.student.graduateDate,'yyyy-MM-dd HH:mm:ss')}"
                       type="text">
                <hr class="hr15">
                <label for="cityName">所属地区&emsp;</label>
                <input class="layui-input" id="cityName" name="cityName" style="width: 240px"
                       th:value="${session.student.city.cityName}" type="text">
                <hr class="hr15">
            </div>

            <hr class="hr20">
        </form>
    </div>
</div>
<div id="resume">
    <div class="login layui-anim layui-anim-up" style="max-width: 80%">
        <div class="message"></div>
        <hr class="hr20">
        <form style="width: 90%;margin-left: 80px">
            <hr class="hr20">
            <div>
                <label for="work_sup"></label><input class="layui-input titles" id="work_sup" style="border: none"
                                                     th:value="工作期望" value="">
                <hr class="hr10">
                <div class="left" style="width: 1000px">
                    <label class="layui-form-label" for="strength">个人优势:</label>
                    <div class="layui-input-inline">
                        <input class="layui-input" id="strength" name="strength" style="width: 800px"
                               th:value="${session.student.resume.strength}"
                               type="text"
                               value="">
                    </div>
                </div>
                <div class="left" style="width: 1000px">
                    <label class="layui-form-label" for="language">语言能力:</label>
                    <div class="layui-input-inline">
                        <input class="layui-input" id="language" name="language" style="width: 800px"
                               th:value="${session.student.resume.language}"
                               type="text"
                               value="">
                    </div>
                </div>
                <div class="left">
                    <label class="layui-form-label" for="resumeCityName">期望地区:</label>
                    <div class="layui-input-inline">
                        <input class="layui-input" id="resumeCityName" name="resumeCityName"
                               th:value="${session.student.resume.city.cityName}"
                               type="text" value="">
                    </div>
                </div>
                <div class="left">
                    <label class="layui-form-label" for="supSalary">期望薪资:</label>
                    <div class="layui-input-inline">
                        <input class="layui-input" id="supSalary" name="supMinSalary"
                               th:value="${session.student.resume.supMinSalary}+'~'+${session.student.resume.supMaxSalary}"
                               type="text"
                               value="">
                    </div>
                </div>
                <div class="left">
                    <label class="layui-form-label" for="industryName">期望行业:</label>
                    <div class="layui-input-inline">
                        <input class="layui-input" id="industryName" name="industryName"
                               th:value="${session.student.resume.industry.industryName}"
                               type="text" value="">
                    </div>
                </div>
                <div class="left">
                    <label class="layui-form-label" for="jobName">期望职业:</label>
                    <div class="layui-input-inline">
                        <input class="layui-input" id="jobName" name="jobName"
                               th:value="${session.student.resume.job.jobName}" type="text"
                               value="">
                    </div>
                </div>
            </div>

            <div>
                <label for="work_exp"></label><input class="layui-input titles" id="work_exp" style="border: none"
                                                     th:value="工作经历" value="">
                <hr class="hr10">
                <div th:each="workExperienceList: ${session.workExperienceList}">
                    <div>
                        <div class="left">
                            <label class="layui-form-label" for="companyName">工作单位:</label>
                            <div class="layui-input-inline">
                                <input class="layui-input" id="companyName" name="companyName"
                                       th:value="${workExperienceList.companyName}"
                                       type="text" value="">
                            </div>
                        </div>
                        <div class="left">
                            <label class="layui-form-label" for="workJobName">工作岗位:</label>
                            <div class="layui-input-inline">
                                <input class="layui-input" id="workJobName" name="workJobName"
                                       th:value="${workExperienceList.job.jobName}"
                                       type="text" value="">
                            </div>
                        </div>
                        <div class="left">
                            <label class="layui-form-label" for="workCityName">工作地区:</label>
                            <div class="layui-input-inline">
                                <input class="layui-input" id="workCityName" name="workCityName"
                                       th:value="${workExperienceList.city.cityName}"
                                       type="text" value="">
                            </div>
                        </div>
                        <div class="left" style="width: 100%">
                            <label class="layui-form-label" for="startDate">在职时间:</label>
                            <div class="layui-input-inline">
                                <input class="layui-input" id="startDate"
                                       name="startDate" style="width: 500px"
                                       th:value="${#dates.format(workExperienceList.startDate,'yyyy-MM-dd HH:mm:ss')} + '&emsp;——&emsp;' + ${#dates.format(workExperienceList.endDate,'yyyy-MM-dd HH:mm:ss')}"
                                       type="text"
                                       value="">
                            </div>
                        </div>
                        <div class="left">
                            <label class="layui-form-label" for="workDuties">工作详情:</label>
                            <div class="layui-input-inline">
                                <input class="layui-input" id="workDuties" name="workDuties"
                                       th:value="${workExperienceList.workDuties}" type="text"
                                       value="">
                            </div>
                        </div>
                        <hr class="hr10">
                    </div>
                </div>
            </div>


            <label>
                <input class="layui-input titles" style="border: none" th:value="项目经历" value="">
            </label>
            <hr class="hr10">
            <div th:each="projectExperienceList: ${session.projectExperienceList}">
                <div>
                    <div class="layui-form-item">
                        <label class="layui-form-label" for="projectName">项目名称:</label>
                        <div class="layui-input-inline left">
                            <input class="layui-input" id="projectName" name="projectName"
                                   th:value="${projectExperienceList.projectName}"
                                   type="text" value="">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label" for="role">担任角色:</label>
                        <div class="layui-input-inline left">
                            <input class="layui-input" id="role" name="role" th:value="${projectExperienceList.role}"
                                   type="text"
                                   value="">
                        </div>
                    </div>
                    <div class="layui-form-item" style="width: 100%;">
                        <label class="layui-form-label" for="projectDescribe">项目详情:</label>
                        <div class="layui-input-inline left">
                            <input class="layui-input" id="projectDescribe" name="projectDescribe" style="width: 800px"
                                   th:value="${projectExperienceList.projectDescribe}" type="text" value="">
                        </div>
                    </div>
                </div>
            </div>
        </form>
    </div>
</div>

<div id="footer" style="width: 100%;height: 50px"></div>

<script type="text/javascript">
    window.onload = function () {
        const input = document.getElementsByClassName("layui-input");
        for (let i = 0; i < input.length; i++) {
            input[i].setAttribute('readonly', 'true');
        }
    }
</script>
<script>
    const idNum = document.getElementById("idNum").value;
</script>
</body>
</html>